<%
    response.setStatus(403);

//获取异常类
    Throwable ex = Exceptions.getThrowable(request);

// 如果是异步请求或是手机端，则直接返回信息
    if (Servlets.isAjaxRequest(request)) {
        if (ex != null && StringUtils.startsWith(ex.getMessage(), "msg:")) {
            out.print(StringUtils.replace(ex.getMessage(), "msg:", ""));
        } else {
            out.print("操作权限不足.");
        }
    }

//输出异常信息页面
    else {
%>
<%@page import="com.shizhi.sts.home.common.web.Servlets" %>
<%@page import="com.shizhi.base.utils.Exceptions" %>
<%@page import="com.shizhi.base.utils.StringUtils" %>
<%@page contentType="text/html;charset=UTF-8" isErrorPage="true" %>
<%@include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>403 - 操作权限不足</title>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link href="${rootPath}/static/metronic/assets/pages/css/error.min.css" rel="stylesheet" type="text/css"/>
    <!-- END PAGE LEVEL STYLES -->
</head>
<body class=" page-404-full-page">

<div class="row">
    <div class="col-md-12 page-404">
        <div class="number font-red"> 403</div>
        <div class="details">
            <h3>出错了!</h3>
            <p> 操作权限不足.
                <br/>
                <a href="javascript:" onclick="history.go(-1);"> 返回上一页 </a> 或者刷新再试试. </p>
        </div>
    </div>
</div>

</body>
</html>
<%
    }
    out = pageContext.pushBody();
%>